package Message.Game
{
    import Framework.MQ.*;
    import Framework.Serialize.*;

    public class SPetUpdate extends Object implements IMessageBase
    {
        public var updateType:int;
        public var uid:String;
        public var petInfo:SPetInfo;
        public var bagType:int;
        public const _type:int = 12026;
        public static var _regist:SPetUpdate = new SPetUpdate(true);

        public function SPetUpdate(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            
        }

        public function getType() : int
        {
            return this._type;
        }

        public function clone() : IMessageBase
        {
            return new SPetUpdate();
        }

        public function __write(param1:SerializeStream) : void
        {
            param1.writeInt(this.updateType);
            param1.writeString(this.uid);
            this.petInfo.__write(param1);
            param1.writeInt(this.bagType);
            
        }

        public function __read(param1:SerializeStream) : void
        {
            this.updateType = param1.readInt();
            this.uid = param1.readString();
            this.petInfo = new SPetInfo();
            this.petInfo.__read(param1);
            this.bagType = param1.readInt();
            
        }

    }
}
